﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class TempOdGiWrapperGeometry : OdGiViewportGeometry
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public TempOdGiWrapperGeometry(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.TempOdGiWrapperGeometry_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(TempOdGiWrapperGeometry obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.deletePD_TempOdGiWrapperGeometry(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new virtual void pline(OdGiPolyline p, uint i, uint n)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_pline(this.swigCPtr, OdGiPolyline.getCPtr(p), i, n);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGeMatrix3d getModelToWorldTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.TempOdGiWrapperGeometry_getModelToWorldTransform(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGeMatrix3d getWorldToModelTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.TempOdGiWrapperGeometry_getWorldToModelTransform(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void pushModelTransform(OdGeVector3d vNormal)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_pushModelTransform__SWIG_0(this.swigCPtr, OdGeVector3d.getCPtr(vNormal));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void pushModelTransform(OdGeMatrix3d xMat)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_pushModelTransform__SWIG_1(this.swigCPtr, OdGeMatrix3d.getCPtr(xMat));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void popModelTransform()
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_popModelTransform(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void circle(OdGePoint3d center, double radius, OdGeVector3d normal)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_circle__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(center), radius, OdGeVector3d.getCPtr(normal));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void circle(OdGePoint3d p1, OdGePoint3d p2, OdGePoint3d p3)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_circle__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2), OdGePoint3d.getCPtr(p3));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void circularArc(OdGePoint3d center, double radius, OdGeVector3d normal, OdGeVector3d startVector, double sweepAngle, OdGiArcType arcType)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_circularArc__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(center), radius, OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(startVector), sweepAngle, (int)arcType);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void circularArc(OdGePoint3d center, double radius, OdGeVector3d normal, OdGeVector3d startVector, double sweepAngle)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_circularArc__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(center), radius, OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(startVector), sweepAngle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void circularArc(OdGePoint3d start, OdGePoint3d point, OdGePoint3d end, OdGiArcType arcType)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_circularArc__SWIG_2(this.swigCPtr, OdGePoint3d.getCPtr(start), OdGePoint3d.getCPtr(point), OdGePoint3d.getCPtr(end), (int)arcType);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void circularArc(OdGePoint3d start, OdGePoint3d point, OdGePoint3d end)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_circularArc__SWIG_3(this.swigCPtr, OdGePoint3d.getCPtr(start), OdGePoint3d.getCPtr(point), OdGePoint3d.getCPtr(end));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void polyline(OdGePoint3d[] nbPoints, OdGeVector3d pNormal, IntPtr lBaseSubEntMarker)
		{
			IntPtr intPtr = Teigha.Core.Helpers.MarshalPoint3dArray(nbPoints);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_polyline__SWIG_0(this.swigCPtr, intPtr, OdGeVector3d.getCPtr(pNormal), lBaseSubEntMarker);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				Marshal.FreeCoTaskMem(intPtr);
			}
		}

		public new virtual void polyline(OdGePoint3d[] nbPoints, OdGeVector3d pNormal)
		{
			IntPtr intPtr = Teigha.Core.Helpers.MarshalPoint3dArray(nbPoints);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_polyline__SWIG_1(this.swigCPtr, intPtr, OdGeVector3d.getCPtr(pNormal));
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				Marshal.FreeCoTaskMem(intPtr);
			}
		}

		public new virtual void polyline(OdGePoint3d[] nbPoints)
		{
			IntPtr intPtr = Teigha.Core.Helpers.MarshalPoint3dArray(nbPoints);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_polyline__SWIG_2(this.swigCPtr, intPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				Marshal.FreeCoTaskMem(intPtr);
			}
		}

		public new virtual void polygon(OdGePoint3d[] nbPoints)
		{
			IntPtr intPtr = Teigha.Core.Helpers.MarshalPoint3dArray(nbPoints);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_polygon(this.swigCPtr, intPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				Marshal.FreeCoTaskMem(intPtr);
			}
		}

		public new virtual void mesh(MeshData rows)
		{
			IntPtr intPtr = Helpers.MarshalMeshData(rows);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_mesh(this.swigCPtr, intPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				Marshal.FreeCoTaskMem(intPtr);
			}
		}

		public new virtual void shell(ShellData nbVertex)
		{
			IntPtr intPtr = Helpers.MarshalShellData(nbVertex);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_shell(this.swigCPtr, intPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				Marshal.FreeCoTaskMem(intPtr);
			}
		}

		public new virtual void text(OdGePoint3d position, OdGeVector3d normal, OdGeVector3d direction, double height, double width, double oblique, string msg)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_text__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(position), OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(direction), height, width, oblique, msg);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void text(OdGePoint3d position, OdGeVector3d normal, OdGeVector3d direction, string msg, bool raw, OdGiTextStyle pTextStyle)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_text__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(position), OdGeVector3d.getCPtr(normal), OdGeVector3d.getCPtr(direction), msg, raw, OdGiTextStyle.getCPtr(pTextStyle));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void ray(OdGePoint3d first, OdGePoint3d second)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_ray(this.swigCPtr, OdGePoint3d.getCPtr(first), OdGePoint3d.getCPtr(second));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void nurbs(OdGeNurbCurve3d nurbs)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_nurbs(this.swigCPtr, OdGeNurbCurve3d.getCPtr(nurbs));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void xline(OdGePoint3d p1, OdGePoint3d p2)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_xline(this.swigCPtr, OdGePoint3d.getCPtr(p1), OdGePoint3d.getCPtr(p2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void ellipArc(OdGeEllipArc3d arc, OdGePoint3d[] pEndPointsOverrides, OdGiArcType arcType)
		{
			IntPtr intPtr = Helpers.MarshalPointPair(pEndPointsOverrides);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_ellipArc__SWIG_0(this.swigCPtr, OdGeEllipArc3d.getCPtr(arc), intPtr, (int)arcType);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				if (intPtr != IntPtr.Zero)
				{
					Marshal.FreeCoTaskMem(intPtr);
				}
			}
		}

		public new virtual void ellipArc(OdGeEllipArc3d arc, OdGePoint3d[] pEndPointsOverrides)
		{
			IntPtr intPtr = Helpers.MarshalPointPair(pEndPointsOverrides);
			try
			{
				GlobalsPINVOKE.TempOdGiWrapperGeometry_ellipArc__SWIG_1(this.swigCPtr, OdGeEllipArc3d.getCPtr(arc), intPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				if (intPtr != IntPtr.Zero)
				{
					Marshal.FreeCoTaskMem(intPtr);
				}
			}
		}

		public new virtual void ellipArc(OdGeEllipArc3d arc)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_ellipArc__SWIG_2(this.swigCPtr, OdGeEllipArc3d.getCPtr(arc));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void draw(OdGiDrawable pD)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_draw(this.swigCPtr, OdGiDrawable.getCPtr(pD));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void pushClipBoundary(OdGiClipBoundary pBoundary)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_pushClipBoundary(this.swigCPtr, OdGiClipBoundary.getCPtr(pBoundary));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void popClipBoundary()
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_popClipBoundary(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void worldLine(OdGePoint3d pnts)
		{
			GlobalsPINVOKE.TempOdGiWrapperGeometry_worldLine(this.swigCPtr, OdGePoint3d.getCPtr(pnts));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
